package spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class First {
	@Autowired
	private Data data;
	
	/*public void setData(Data data) {
		this.data = data;
	}*/

	public void set(String name,String sex,Integer age,String address) {
		data.setName(name);
		data.setSex(sex);
		data.setAddress(address);
		data.setAge(age);
	}
	
	public void print() {
		System.out.println(data);
	}
}
